package com.wjw.java.io.standard;

import java.util.Scanner;

/**
 * 标准输入流：InputStream 键盘
 * 标准输出流：PrintStream 显示器
 */
public class InputStreamAndPrintStream {

    public static void main(String[] args) {
        //1.标准输入流：
        //System类的public final static InputStream in = null;
        //System.in编译类型：InputStream
        //System.in运行类型：BufferedInputStream
        System.out.println(System.in.getClass());//BufferedInputStream

        //2.标准输出流：
        //System类的public final static PrintStream out = null;
        //System.out编译类型：PrintStream
        //System.out运行类型：PrintStream
        System.out.println(System.out.getClass());//PrintStream

        //3.案例
        Scanner scanner = new Scanner(System.in);
        System.out.println("System.out.println就是标准的输出流：请输入一段内容");
        String str = scanner.next();
        System.out.println("str:"+str);
    }
}
